<template>
    <Navtitle title="详情页"></Navtitle>
    <Swipe :images="imagelink"></Swipe>
    <div v-html="detailApiData.goods_introduce"></div>
    <van-action-bar>
        <van-action-bar-icon icon="chat-o" text="客服" dot />
        <van-action-bar-icon icon="cart-o" text="购物车" badge="5" />
        <van-action-bar-icon icon="shop-o" text="店铺" badge="12" />
        <van-action-bar-button type="warning" text="加入购物车" />
        <van-action-bar-button type="danger" text="立即购买" />
    </van-action-bar>
</template>

<script setup>
import { detailApi } from '@/api/api';
import Navtitle from '@/components/Navtitle.vue';
import Swipe from '@/components/Swipe.vue';
import { ref } from 'vue';
import { useRoute } from 'vue-router';
let detailApiData = ref([])
let route = useRoute()
detailApi(route.params.goods_id).then(res => {
    console.log('详情数据', res)
    detailApiData.value = res.data.message
})
const imagelink = [
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-5.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-6.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-7.jpeg',
];
</script>

<style lang="scss" scoped></style>